﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RandomState : StateMachineBehaviour
{
    public string condition_name;
    public int num;

    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        animator.SetInteger(condition_name, Random.Range(0, num));
    }
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        animator.SetInteger(condition_name, -1);
    }
}
